package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MaintenanceRecordsMapper;
import com.ruoyi.system.domain.MaintenanceRecords;
import com.ruoyi.system.service.IMaintenanceRecordsService;

/**
 * 车辆信息维修保养记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-12
 */
@Service
public class MaintenanceRecordsServiceImpl implements IMaintenanceRecordsService 
{
    @Autowired
    private MaintenanceRecordsMapper maintenanceRecordsMapper;

    /**
     * 查询车辆信息维修保养记录
     * 
     * @param recordId 车辆信息维修保养记录主键
     * @return 车辆信息维修保养记录
     */
    @Override
    public MaintenanceRecords selectMaintenanceRecordsByRecordId(Long recordId)
    {
        return maintenanceRecordsMapper.selectMaintenanceRecordsByRecordId(recordId);
    }

    /**
     * 查询车辆信息维修保养记录列表
     * 
     * @param maintenanceRecords 车辆信息维修保养记录
     * @return 车辆信息维修保养记录
     */
    @Override
    public List<MaintenanceRecords> selectMaintenanceRecordsList(MaintenanceRecords maintenanceRecords)
    {
        return maintenanceRecordsMapper.selectMaintenanceRecordsList(maintenanceRecords);
    }

    /**
     * 新增车辆信息维修保养记录
     * 
     * @param maintenanceRecords 车辆信息维修保养记录
     * @return 结果
     */
    @Override
    public int insertMaintenanceRecords(MaintenanceRecords maintenanceRecords)
    {
        return maintenanceRecordsMapper.insertMaintenanceRecords(maintenanceRecords);
    }

    /**
     * 修改车辆信息维修保养记录
     * 
     * @param maintenanceRecords 车辆信息维修保养记录
     * @return 结果
     */
    @Override
    public int updateMaintenanceRecords(MaintenanceRecords maintenanceRecords)
    {
        return maintenanceRecordsMapper.updateMaintenanceRecords(maintenanceRecords);
    }

    /**
     * 批量删除车辆信息维修保养记录
     * 
     * @param recordIds 需要删除的车辆信息维修保养记录主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceRecordsByRecordIds(Long[] recordIds)
    {
        return maintenanceRecordsMapper.deleteMaintenanceRecordsByRecordIds(recordIds);
    }

    /**
     * 删除车辆信息维修保养记录信息
     * 
     * @param recordId 车辆信息维修保养记录主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceRecordsByRecordId(Long recordId)
    {
        return maintenanceRecordsMapper.deleteMaintenanceRecordsByRecordId(recordId);
    }
}
